package com.himore.api.web.service.impl;

import java.util.List;
import java.util.Map;

import com.himore.api.common.utils.DateUtils;
import com.himore.api.web.mapper.TPictureMapper;
import com.himore.api.web.model.*;
import com.himore.api.web.service.ITPictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 任务信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-01-16
 */
@Service
public class TPictureServiceImpl implements ITPictureService
{
    @Autowired
    private TPictureMapper tPictureMapper;

    /**
     * 查询任务信息
     * 
     * @param picId 任务信息ID
     * @return 任务信息
     */
    @Override
    public TPicture selectTPictureById(Long picId)
    {
        return tPictureMapper.selectTPictureById(picId);
    }

    /**
     * 查询任务信息列表
     * 
     * @param tPicture 任务信息
     * @return 任务信息
     */
    @Override
    public List<TPicture> selectTPictureList(TPicture tPicture)
    {
        return tPictureMapper.selectTPictureList(tPicture);
    }

    /**
     * 新增任务信息
     * 
     * @param tPicture 任务信息
     * @return 结果
     */
    @Override
    public int insertTPicture(TPicture tPicture)
    {
        tPicture.setCreateTime(DateUtils.getNowDate());
        return tPictureMapper.insertTPicture(tPicture);
    }

    /**
     * 修改任务信息
     * 
     * @param tPicture 任务信息
     * @return 结果
     */
    @Override
    public int updateTPicture(TPicture tPicture)
    {
        tPicture.setUpdateTime(DateUtils.getNowDate());
        return tPictureMapper.updateTPicture(tPicture);
    }

    /**
     * 批量删除任务信息
     * 
     * @param picIds 需要删除的任务信息ID
     * @return 结果
     */
    @Override
    public int deleteTPictureByIds(String[] picIds)
    {
        return tPictureMapper.deleteTPictureByIds(picIds);
    }

    /**
     * 删除任务信息信息
     * 
     * @param picId 任务信息ID
     * @return 结果
     */
    @Override
    public int deleteTPictureById(Long picId)
    {
        return tPictureMapper.deleteTPictureById(picId);
    }

    @Override
    public int saveBatch(TPicture tPicture) {
        return tPictureMapper.saveBatch(tPicture);
    }

    @Override
    public List<PicInfoResultVO> getDayInfoByTime(Map param) {
        return tPictureMapper.getPicInfoByTime(param);
    }

    @Override
    public List<PicDetailInfoVO> selectTDayInfoList(Map param) {
        return tPictureMapper.selectTPicInfoList(param);
    }


    @Override
    public List<HasPicVO> checkIfHasPic(Map param) {
        return tPictureMapper.checkIfHasPic(param);
    }
}
